

CREATE DATABASE pvnSpring
GO
USE pvnSpring

--
-- Table structure for table pvn_spring.Product
--

CREATE TABLE ProductType (
  ProductTypeId int NOT NULL IDENTITY(1,1) PRIMARY KEY,
  ProductTypeName Nvarchar(100) NOT NULL,
) 


INSERT INTO ProductType (ProductTypeName) VALUES ('Car')
 INSERT INTO ProductType (ProductTypeName) VALUES ('Moto');
 

CREATE TABLE Product(
  ProductId int NOT NULL IDENTITY(1,1) PRIMARY KEY,
  ProductTypeId int NOT NULL FOREIGN KEY REFERENCES ProductType(ProductTypeId),
  ProductName Nvarchar(100) NOT NULL,
  ProductPrice float NOT NULL,
  ProductContent text NOT NULL,
  ProductImage Nvarchar(100) NOT NULL,
) 


--
-- Dumping data for table pvn_spring.Product
--

/*!40000 ALTER TABLE Product DISABLE KEYS */;
INSERT INTO Product(ProductTypeId,ProductName,ProductPrice,ProductContent,ProductImage) VALUES 
INSERT INTO Product(ProductTypeId,ProductName,ProductPrice,ProductContent,ProductImage) VALUES  (1,'Audi R8',12312,'Audi R8','audi-r8-2.jpg')
INSERT INTO Product(ProductTypeId,ProductName,ProductPrice,ProductContent,ProductImage) VALUES  (1,'Ferrari 458',52635,'Ferrari 458 Italia Colors','ferrari-458-italia-colors-23.jpg')
INSERT INTO Product(ProductTypeId,ProductName,ProductPrice,ProductContent,ProductImage) VALUES  (1,'Acura ZDX Advance 2009',123123,'<p>\r\n	Acura ZDX Advance 2009</p>\r\n','Acura ZDX Advance 2009.jpg')
INSERT INTO Product(ProductTypeId,ProductName,ProductPrice,ProductContent,ProductImage) VALUES  (1,'Acura ZDX SH AWD - 2010',312,'<p>\r\n	Enter content here ^^</p>\r\n','Acura ZDX SH AWD - 2010.jpg')
INSERT INTO Product(ProductTypeId,ProductName,ProductPrice,ProductContent,ProductImage) VALUES  (1,'Audi Q5 2.0V 2010',312,'<p>\r\n	Audi Q5 2.0V 2010</p>\r\n','Audi Q5 2.0V 2010.jpg')
INSERT INTO Product(ProductTypeId,ProductName,ProductPrice,ProductContent,ProductImage) VALUES  (1,'Audi TT S Roadster 2009',123123,'<p>\r\n	Enter content here ^^</p>\r\n','Audi TT S Roadster 2009.jpg')
INSERT INTO Product(ProductTypeId,ProductName,ProductPrice,ProductContent,ProductImage) VALUES  (1,'BMW 7 Series 740 2009',123123,'<p>\r\n	BMW 7 Series 740 2009</p>\r\n','BMW 7 Series 740 2009.jpg')
INSERT INTO Product(ProductTypeId,ProductName,ProductPrice,ProductContent,ProductImage) VALUES  (1,'BMW X6 XDrive 50i 2010',123123,'<p>\r\n	BMW X6 XDrive 50i 2010</p>\r\n','BMW X6 XDrive 50i 2010.jpg')
INSERT INTO Product(ProductTypeId,ProductName,ProductPrice,ProductContent,ProductImage) VALUES  (1,'Rolls-Royce Ghost 2010',123123,'<p>\r\n	Rolls-Royce Ghost 2010</p>\r\n','Rolls-Royce Ghost 2010.jpg')
INSERT INTO Product(ProductTypeId,ProductName,ProductPrice,ProductContent,ProductImage) VALUES  (1,'Toyota Land Cruiser PRADO GX 2.7 AT 2010',12546,'<p>\r\n	Toyota Land Cruiser PRADO GX 2.7 AT 2010</p>\r\n','Toyota Land Cruiser PRADO GX 2.7 AT 2010.jpg')


--
-- Table structure for table pvn_spring.ProductType
--

/*!40000 ALTER TABLE ProductType ENABLE KEYS */;


--
-- Table structure for table pvn_spring.User
--


CREATE TABLE [User](
  UserId int IDENTITY(1,1) NOT NULL PRIMARY KEY,
  UserName Nvarchar(50) NOT NULL,
  UserPassword Nvarchar(50) NOT NULL,
)

--
-- Dumping data for table pvn_spring.User
--

INSERT INTO [User](UserName,UserPassword) VALUES ('mhnguyen034','12345');

